Network Model
Visualization
Understanding
complicated
network models
through visualization
Sam Tyner
@sctyner
@sctyner
Outline
- Motivation
- Working Example
- Model
- Visualizations
- Static
- Animation
- Interactivity with
plotly
Motivating Example
Childhood vaccination - major public health concern

Questions
Interactions in animation aren’t realistic - people don’t behave like bacteria in petri dishes!
- How do communities affect vaccination rate?
- How do communities affect spread of disease from outside source?
- What factors lead to unvaccinated children?
- Can communities be identified and targeted for immunization programs?
Can network modeling answer these?
Working Example
Another public health concern - underage drinking & smoking
How do friendships influence drinking and smoking behavior in teenagers?
Steglich, Snijders & Pearson (2010) “Dynamic Networks and Behavior: Searating Selection from Influence”
Data
From “Teenage Friends and Lifestyle Study” (Pearson & Mitchell (2000); Pearson & West (2003))
- Glasgow, Scotland, UK, Feb 1995 - Jan 1997
- Panel data - three waves - aged 12-13 to 14-15
- Each student lists up to 6 school friends
- Smoking & drinking behavior, other lifestyle variables collected
- 160 students in total, only 50 in example data
Model
- Want: to determine how friendships change risky behavior and vice versa over time
- Solution: stochastic actor-oriented models (SAOMs) for networks (Snijders 1996)
- Stochastic because they model network change over time
- Actor-oriented because actor-level covariates are incorporated into model parameters XX EXAMPLE XX
Underlying Mechanisms?
Network changes
- Change doesn’t happen all at once, but network observations are discrete
- Changes are dependent, with a highly complex structure
- How to model process?
- Continuous-time Markov chains (CTMCs)
- Condition on wave 1
- Choose one actor (call it \(i\)) to (potentially) make a change
- Optimize some utility function by changing ties - choose “best” friend to have or “worst” friend to cut loose
Rate Function
Rate at which actors are selected to act
- Simple rate parameter, \(\alpha\), for all actors
- Waiting time for one actor to act is distributed \(Exp(\alpha^{-1})\)
- Waiting time for any actor to act is distributed \(Exp((n\alpha)^{-1})\)
- Probability that actor \(i\) will be the next one to act is \(\frac{1}{n}\)
Objective Function
When actor \(i\) can change, it tries to maximize its objective function:
\[f_i(x, \mathbf{z}, \boldsymbol{\beta}) = \sum_k \beta_k s_{ik}(x, \mathbf{z})\]
- \(x\) is the network state
- \(\mathbf{z}\) is a matrix of actor-level covariates
- \(s_{ik}(x, \mathbf{z})\) are network & covariate statistics
- \(\beta_k\) are the parameters to be fit in the model
- There can be any number of \(\beta_k\) added to the model (problematic)
Transition Probability
The probability that actor \(i\) will change the tie to actor \(j\) is:
\[p_{ij} = \frac{\exp\left\{f_i(x(i\leadsto j), \mathbf{z}, \boldsymbol{\beta})\right\}}{\sum_h \exp\left\{f_i(x(i\leadsto h), \mathbf{z}, \boldsymbol{\beta})\right\}}\] - \(x(i\leadsto j)\) is the network identical to the current state, \(x\), except for \(x_{ij}\), which becomes \(1-x_{ij}\)
(Some) Possible Model Parameters
| outdegree* |
\(s_{i1}(x) = \sum_j x_{ij}\) |
Popularity |
| reciprocity* |
\(s_{i2}(x) = \sum_j x_{ij}x_{ji}\) |
Reciprocated relationships |
| transitive triplets |
\(s_{i3}(x) = \sum_{j,h} x_{ij}x_{jh}x_{ih}\) |
Your friend becomes my friend |
| covariate-alter |
\(s_{i4}(x) = \sum_j x_{ij}z_j\) |
Effect of my friend’s behavior on friendship |
| covariate-ego |
\(s_{i5}(x) = z_i\sum_j x_{ij}\) |
Effect of my behavior on friendship |
| same covariate |
\(s_{i6}(x) = \sum_j x_{ij} \mathbb{I}(z_i = z_j)\) |
Birds of a feather flock together |
Small SAOMs Example
- Small subset of the 50 friends data
- Fit three models for network evolution
- M1: “straw man” model that only has 2 parameters in obective function
- M2: M1 with one significant covariate effect added (drinking behavior)
- M3: M1 with one significant structural effect added (XX LOOK UP INTERPRETATION XX )
Static Visualizations
- Collections of models & corresponding parameter estimates
- “Heatmap” of probabilities
Distributions of Fitted Model Effects
Correlation of Estimates

Animation
- What does the underlying CTMC actually look like?
GIF of Awesomeness
Interactivity with plotly
Future Work
- Shiny app for more interactivity
- Simulation studies with more visualization
References
Pearson, M. and Michell, L. 2000. “Smoke Rings: Social Network Analysis of Friendship Groups, Smoking, and Drug-Taking.” Drugs: Education, Prevention and Policy 7(1):21-37.
Pearson, M. and West, P. 2003. “Drifting Smoke Rings: Social Network Analysis and Markov Processes in a Longitudinal Study of Friendship Groups and Risk-Taking.” Connections 25(2):59-76.
Steglich, C., Snijders, T.A.B, and Pearson, M. 2010. “Dynamic Networks and Behavior: Separating Selection from Influence.” Sociological Methodology. 40(1):329-393.
Snijders, T.A.B. 1996. “Stochastic actor-oriented models for network change.” Journal of Mathematical Sociology 21:149-172.